﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EasyStep.TestActions.Utils
{
    public static class ActionUtils
    {
        public static string RandomString(string size_string)
        {
            int size;
            size = Convert.ToInt32(size_string);
            StringBuilder builder = new StringBuilder();
            Random random = new Random();
            char ch;

            for (int i = 0; i < size; i++)
            {
                ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
                builder.Append(ch);
            }

            return builder.ToString().ToLower();
        }
        public static string RandomEmail()
        {
            return string.Format("{0}@test.com", RandomString("5"));
        }
    }
}
